<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: CConditionalVariable类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="class_c_conditional_variable-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CConditionalVariable类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>条件变量类  
 <a href="class_c_conditional_variable.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_conditional_variable_8h_source.html">ConditionalVariable.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:acebd8fbefe1e7b2693d87bea40404935"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_conditional_variable.html#acebd8fbefe1e7b2693d87bea40404935">CConditionalVariable</a> ()</td></tr>
<tr class="memdesc:acebd8fbefe1e7b2693d87bea40404935"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个条件变量，若失败则抛出异常，可使用标准异常exception进行捕获  <a href="class_c_conditional_variable.html#acebd8fbefe1e7b2693d87bea40404935">更多...</a><br /></td></tr>
<tr class="separator:acebd8fbefe1e7b2693d87bea40404935"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a603e10873dd6a629ca6e228d34f1f169"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_conditional_variable.html#a603e10873dd6a629ca6e228d34f1f169">~CConditionalVariable</a> ()</td></tr>
<tr class="separator:a603e10873dd6a629ca6e228d34f1f169"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13daf2f285fa37945426a45c3ae0f9ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_conditional_variable.html#a13daf2f285fa37945426a45c3ae0f9ea">Wait</a> (unsigned <a class="el" href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a> pred, <a class="el" href="class_c_mutex_base.html">CMutexBase</a> *mutex)</td></tr>
<tr class="memdesc:a13daf2f285fa37945426a45c3ae0f9ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">等待一个条件变量有信号  <a href="class_c_conditional_variable.html#a13daf2f285fa37945426a45c3ae0f9ea">更多...</a><br /></td></tr>
<tr class="separator:a13daf2f285fa37945426a45c3ae0f9ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fd9cec3522e4a466755c96ecc25f753"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_conditional_variable.html#a5fd9cec3522e4a466755c96ecc25f753">WaitForever</a> (<a class="el" href="class_c_mutex_base.html">CMutexBase</a> *mutex)</td></tr>
<tr class="memdesc:a5fd9cec3522e4a466755c96ecc25f753"><td class="mdescLeft">&#160;</td><td class="mdescRight">一直等待一个条件变量有信号  <a href="class_c_conditional_variable.html#a5fd9cec3522e4a466755c96ecc25f753">更多...</a><br /></td></tr>
<tr class="separator:a5fd9cec3522e4a466755c96ecc25f753"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a300c6fafb0cbd156105a6adf4e5f22d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_conditional_variable.html#a300c6fafb0cbd156105a6adf4e5f22d0">NotifyOne</a> ()</td></tr>
<tr class="memdesc:a300c6fafb0cbd156105a6adf4e5f22d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知某个等待退出  <a href="class_c_conditional_variable.html#a300c6fafb0cbd156105a6adf4e5f22d0">更多...</a><br /></td></tr>
<tr class="separator:a300c6fafb0cbd156105a6adf4e5f22d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85f51ff4e88bbe22303d648e3f7bd7a4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_conditional_variable.html#a85f51ff4e88bbe22303d648e3f7bd7a4">NotifyAll</a> ()</td></tr>
<tr class="memdesc:a85f51ff4e88bbe22303d648e3f7bd7a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知所有等待退出  <a href="class_c_conditional_variable.html#a85f51ff4e88bbe22303d648e3f7bd7a4">更多...</a><br /></td></tr>
<tr class="separator:a85f51ff4e88bbe22303d648e3f7bd7a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:ad3c28fe72c30d76991676f7f6c71f8d0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_conditional_variable.html#ad3c28fe72c30d76991676f7f6c71f8d0">delete_class_copy_operator</a> (<a class="el" href="class_c_conditional_variable.html">CConditionalVariable</a>)</td></tr>
<tr class="separator:ad3c28fe72c30d76991676f7f6c71f8d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a458acb91a974ea6c422b233f83d843a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="tools_8h.html#a01e895c2df346ffe662bbe69686d8d51">SYNCHANDLE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_conditional_variable.html#a458acb91a974ea6c422b233f83d843a8">_cond</a></td></tr>
<tr class="separator:a458acb91a974ea6c422b233f83d843a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>条件变量类 </p>

<p class="definition">在文件 <a class="el" href="_conditional_variable_8h_source.html">ConditionalVariable.h</a> 第 <a class="el" href="_conditional_variable_8h_source.html#l00010">10</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="acebd8fbefe1e7b2693d87bea40404935"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acebd8fbefe1e7b2693d87bea40404935">&#9670;&nbsp;</a></span>CConditionalVariable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a> CConditionalVariable::CConditionalVariable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造一个条件变量，若失败则抛出异常，可使用标准异常exception进行捕获 </p>

<p class="definition">在文件 <a class="el" href="_conditional_variable_8cpp_source.html">ConditionalVariable.cpp</a> 第 <a class="el" href="_conditional_variable_8cpp_source.html#l00008">8</a> 行定义.</p>

</div>
</div>
<a id="a603e10873dd6a629ca6e228d34f1f169"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a603e10873dd6a629ca6e228d34f1f169">&#9670;&nbsp;</a></span>~CConditionalVariable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CConditionalVariable::~CConditionalVariable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_conditional_variable_8cpp_source.html">ConditionalVariable.cpp</a> 第 <a class="el" href="_conditional_variable_8cpp_source.html#l00022">22</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ad3c28fe72c30d76991676f7f6c71f8d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3c28fe72c30d76991676f7f6c71f8d0">&#9670;&nbsp;</a></span>delete_class_copy_operator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CConditionalVariable::delete_class_copy_operator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_conditional_variable.html">CConditionalVariable</a>&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a85f51ff4e88bbe22303d648e3f7bd7a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85f51ff4e88bbe22303d648e3f7bd7a4">&#9670;&nbsp;</a></span>NotifyAll()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CConditionalVariable::NotifyAll </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>通知所有等待退出 </p>

<p class="definition">在文件 <a class="el" href="_conditional_variable_8cpp_source.html">ConditionalVariable.cpp</a> 第 <a class="el" href="_conditional_variable_8cpp_source.html#l00053">53</a> 行定义.</p>

</div>
</div>
<a id="a300c6fafb0cbd156105a6adf4e5f22d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a300c6fafb0cbd156105a6adf4e5f22d0">&#9670;&nbsp;</a></span>NotifyOne()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CConditionalVariable::NotifyOne </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>通知某个等待退出 </p>

<p class="definition">在文件 <a class="el" href="_conditional_variable_8cpp_source.html">ConditionalVariable.cpp</a> 第 <a class="el" href="_conditional_variable_8cpp_source.html#l00048">48</a> 行定义.</p>

</div>
</div>
<a id="a13daf2f285fa37945426a45c3ae0f9ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13daf2f285fa37945426a45c3ae0f9ea">&#9670;&nbsp;</a></span>Wait()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a> CConditionalVariable::Wait </td>
          <td>(</td>
          <td class="paramtype">unsigned <a class="el" href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a>&#160;</td>
          <td class="paramname"><em>pred</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_c_mutex_base.html">CMutexBase</a> *&#160;</td>
          <td class="paramname"><em>mutex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>等待一个条件变量有信号 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">pred</td><td>等待时长,单位毫秒 </td></tr>
    <tr><td class="paramname">mutex</td><td>传入的锁 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true，失败返回false </dd></dl>

<p class="definition">在文件 <a class="el" href="_conditional_variable_8cpp_source.html">ConditionalVariable.cpp</a> 第 <a class="el" href="_conditional_variable_8cpp_source.html#l00028">28</a> 行定义.</p>

</div>
</div>
<a id="a5fd9cec3522e4a466755c96ecc25f753"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5fd9cec3522e4a466755c96ecc25f753">&#9670;&nbsp;</a></span>WaitForever()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a> CConditionalVariable::WaitForever </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_mutex_base.html">CMutexBase</a> *&#160;</td>
          <td class="paramname"><em>mutex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>一直等待一个条件变量有信号 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">mutex</td><td>传入的锁 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true，失败返回false </dd></dl>

<p class="definition">在文件 <a class="el" href="_conditional_variable_8cpp_source.html">ConditionalVariable.cpp</a> 第 <a class="el" href="_conditional_variable_8cpp_source.html#l00038">38</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a458acb91a974ea6c422b233f83d843a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a458acb91a974ea6c422b233f83d843a8">&#9670;&nbsp;</a></span>_cond</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="tools_8h.html#a01e895c2df346ffe662bbe69686d8d51">SYNCHANDLE</a> CConditionalVariable::_cond</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_conditional_variable_8h_source.html">ConditionalVariable.h</a> 第 <a class="el" href="_conditional_variable_8h_source.html#l00040">40</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>H:/project/LibTools/src/thread/<a class="el" href="_conditional_variable_8h_source.html">ConditionalVariable.h</a></li>
<li>H:/project/LibTools/src/thread/<a class="el" href="_conditional_variable_8cpp_source.html">ConditionalVariable.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
